<template>
    <el-dialog
        :visible.sync="dialogVisible"
        title="选择座位"
        :close-on-press-escape="false"
        :close-on-click-modal="false"
        width="1000px"
    >
        <el-table
            style="width: 100%"
            :data="arrangeSectionSeatOptions"
            border
            stripe
            @selection-change="handleSelectionChange"
        >
            <el-table-column
              type="selection"
              width="55">
            </el-table-column>
            <el-table-column prop="seatName" label="座位名称" width="80"/>
            <el-table-column prop="seatPrice" label="价格(元)" width="80"/>
            <el-table-column prop="status" label="售座类型" width="80">
                <template #default="scope">
                    <el-tag :type="scope.row.saleTicketTypeStyle">
                        {{ scope.row.saleTicketTypeName }}
                    </el-tag>
                </template>
            </el-table-column>
            <el-table-column prop="status" label="状态" width="80">
                <template #default="scope">
                    <el-tag :type="scope.row.statusStyle">
                        {{ scope.row.statusName }}
                    </el-tag>
                </template>
            </el-table-column>
            <el-table-column prop="name" label="姓名" width="120">
                <template #default="scope">
                    <el-input v-model="scope.row.name" placeholder="请输入" />
                </template>
            </el-table-column>
            <el-table-column prop="certificateType" label="证件类型" width="110">
                <template #default="scope">
                    <el-select v-model="scope.row.certificateType" filterable >
                        <el-option
                            v-for="item in Dict.enums.certificateType"
                            :key="item.code"
                            :label="item.name"
                            :value="item.code"
                        />
                    </el-select>
                </template>
            </el-table-column>
            <el-table-column prop="certificateNo" label="证件号码">
                <template #default="scope">
                    <el-input v-model="scope.row.certificateNo" placeholder="请输入" />
                </template>
            </el-table-column>
        </el-table>
        <div slot="footer" class="dialog-footer">
            <el-button @click="dialogVisible = false">取 消</el-button>
            <el-button slot="reference" type="primary" @click="confirmSel()">确定</el-button>
        </div>
    </el-dialog>
</template>

<script>

export default {
    name: 'TicketOrderSelSeat',
    components: {},
    data() {
        return {
            selSeatList:[],

            arrangeSectionSeatOptions:[],
            dialogVisible: false,

        }
    },

    methods: {
        // 显示组件
        show(arrangeSectionSeatList,currentSeatList) {
            this.arrangeSectionSeatOptions = arrangeSectionSeatList
            this.selSeatList = currentSeatList
            this.dialogVisible = true
        },
        handleSelectionChange(val) {
            this.selSeatList = val
        },
        confirmSel(){
            this.dialogVisible = false
            this.$emit('refresh',this.selSeatList)
        }

    }
}
</script>
